Onekey System API
Data Mappings
Codes
| Module | Description |
|---|---|
| codes.json | Template for mapping OneKey Codes to Salesforce dynamic picklists. |
| codeValues.json | Template for mapping OneKey values to Salesforce picklist values by using a OneKey code from Codes.json. |
codes.json
Provides the default template for mapping codes. To define country-specific mappings, create a file named codes_{Country_isoCod2}.json. If no country-specific file exists, the system uses the default codes.json.
| Field Name | Description |
|---|---|
| Source_Code | OneKey code as per the code's endpoint. |
| Target_Field | Fullname of Salesforce StandardValueSet. |
| Mapping_Field | Optional. Common or mapping names are assigned to a specific Salesforce field and are utilized across all provided mapping templates. |
| Description | Optional. The description for the entity field. |
| isNewValueRequired | Indicates if new unmapped values are loaded along with mapped values (true) or only mapped values are loaded (false). |
Source:
./src/main/resources/mappingTemplates/codes/codes.json
codeValues.json
Provides the default template for mapping code values. To define country-specific mappings, create a file named codeValues_{Country_isoCod2}.json. If no country-specific file exists, the system uses the default codeValues.json.
| Field Name | Description |
|---|---|
| Source_Code | OneKey code as per the code's endpoint. |
| CodeValues | Optional. Specifies picklist conversions. |
Source:
./src/main/resources/mappingTemplates/codes/codeValues.json
Search
| Module | Description |
|---|---|
| businessaccount.json | Template for mapping "Workplace" search fields. |
| personaccount.json | Template for mapping "Individual" search fields. |
| searchFunctions.dwl | Utility functions for transforming search fields. |
| searchMapper.dwl | Functions to create OneKey search payload. |
businessaccount.json
Provides the default template for mapping "Workplace" search fields. To define country-specific mappings, create a file named businessaccount_{Country_isoCod2}.json. If no country-specific file exists, the system uses the default businessaccount.json.
| Field Name | Description |
|---|---|
| Source_Field | Salesforce field name in entityName.fieldName format. |
| Target_Field | OneKey field name as per search endpoint. |
| Method | Optional. Use "FUZZY" for fuzzy text searches. |
| Function | Optional. Function name from "searchFunctions.dwl". Used to transform the source value. |
| CodeValues | Optional. Specifies picklist conversions or inherits them from codeValues.json when referCodesMapping is used. |
Source:
./src/main/resources/mappingTemplates/search/businessaccount.json
personaccount.json
Provides the default template for mapping "Individual" search fields. To define country-specific mappings, create a file named personaccount_{Country_isoCod2}.json. If no country-specific file exists, the system uses the default personaccount.json.
| Field Name | Description |
|---|---|
| Source_Field | Salesforce field name in entityName.fieldName format. |
| Target_Field | OneKey field name as per search endpoint. |
| Method | Optional. Use "FUZZY" for fuzzy text searches. |
| Function | Optional. Function name from "searchFunctions.dwl". Used to transform the source value. |
| CodeValues | Optional. Specifies picklist conversions or inherits them from codeValues.json when referCodesMapping is used. |
Source:
./src/main/resources/mappingTemplates/search/personaccount.json
searchFunctions.dwl
Utility functions for transforming search fields. Create new functions for any other transformations here.
Source:
./src/main/resources/mappingTemplates/search/searchFunctions.dwl
searchMapper.dwl
Creates the payload for a OneKey search. Uses mapping template from country specific businessaccount.json or personaccount.json. If a country-specific template isn't found, the default template is used.
Source:
./src/main/resources/mappingTemplates/search/searchMapper.dwl
Download
| Module | Description |
|---|---|
| activity.json | Template for mapping OneKey "Activity" to Salesforce fields. |
| individual.json | Template for mapping OneKey "Individual" to Salesforce fields. |
| objects.json | Salesforce Object names reference file. |
| workplace.json | Template for mapping OneKey "Workplace" to Salesforce fields. |
| activityMapper.dwl | Functions for mapping OneKey "Activity" to Salesforce fields. |
| individualMapper.dwl | Functions for mapping OneKey "Individual" to Salesforce fields. |
| workplaceMapper.dwl | Functions for mapping OneKey "Workplace" to Salesforce fields. |
activity.json
Provides the default template for mapping "Activity" search fields. To define country-specific mappings, create a file named activity_{Country_isoCod2}.json. If no country-specific file exists, the system uses the default activity.json.
| Field Name | Description |
|---|---|
| Source_Field | LHS identifier used in activityMapper.dwl |
| Target_Field | Salesforce field name. |
| CodeValues | Optional. Specifies picklist conversions or inherits them from codeValues.json when referCodesMapping is used. |
Source:
./src/main/resources/mappingTemplates/download/activity.json
individual.json
Provides the default template for mapping "Individual" search fields. To define country-specific mappings, create a file named individual_{Country_isoCod2}.json. If no country-specific file exists, the system uses the default individual.json.
| Field Name | Description |
|---|---|
| Source_Field | LHS identifier used in individualMapper.dwl |
| Target_Field | Salesforce field name. |
| CodeValues | Optional. Specifies picklist conversions or inherits them from codeValues.json when referCodesMapping is used. |
Source:
./src/main/resources/mappingTemplates/download/individual.json
objects.json
Salesforce Object names reference file.Create objects_{Country_isoCod2}.json for country-specific mappings. If a country-specific mapping isn't found, the default objects.json mapping will be considered.
Source:
./src/main/resources/mappingTemplates/download/objects.json
workplace.json
Provides the default template for mapping "Workplace" search fields. To define country-specific mappings, create a file named workplace_{Country_isoCod2}.json. If no country-specific file exists, the system uses the default workplace.json.
| Field Name | Description |
|---|---|
| Source_Field | LHS identifier used in workplaceMapper.dwl |
| Target_Field | Salesforce field name. |
| CodeValues | Optional. Specifies picklist conversions or inherits them from codeValues.json when referCodesMapping is used. |
Source:
./src/main/resources/mappingTemplates/download/workplace.json
activityMapper.dwl
Contains functions for mapping OneKey “Activity” to Salesforce fields. Uses identifiers from a country-specific activity.json file and object names from a country-specific objects.json file. If a country-specific file isn't present, default files are considered.
| Field Name | Description |
|---|---|
| Function Name | Description |
| activity_base_mapping | Maps OneKey activity to Salesforce Composite API format. |
| mapActivityRecord | Uses "activity_base_mapping" during Initial/Delta sync. |
| downloadActivityRecord | Uses "activity_base_mapping" during search-download. |
Source:
./src/main/resources/mappingTemplates/download/activityMapper.dwl
individualMapper.dwl
Contains functions for mapping OneKey “individual” to Salesforce fields. Uses identifiers from a country-specific individual.json file and object names from a country-specific objects.json. If a country-specific file isn’t present, default files are considered.
| Function Name | Description |
|---|---|
| Main Functions | |
| mapIndividualRecord | Uses Mapper functions to map OneKey Individual to Salesforce Composite API format during Initial/Delta sync. |
| downloadIndividualRecord | Uses Mapper functions to map OneKey Individual to Salesforce Composite API format during search-download. |
| Mapper Functions | |
| ind_base_mapping | Maps OneKey Individual response header fields to the main entity. |
| ind_hcp_mapping | Maps OneKey Individual response header fields to an extension entity. |
| ind_hcp_npi_mapping | Maps OneKey Individual NPI data to a corresponding entity in Salesforce. |
| ind_person_education_mapping | Maps OneKey Individual Education data to a corresponding entity in Salesforce. |
| ind_language_mapping | Maps OneKey Individual Language data to a corresponding entity in Salesforce. |
| ind_care_specialty_mapping | Maps OneKey Speciality to a master data entity. The ID of the master data will be used in Individual specialty mapping. |
| ind_healthcare_specialty_mapping | Maps Speciality ID from master data to individual specialties. |
| ind_business_license_mapping | Maps OneKey Individual license data and license address data to corresponding entities in Salesforce. |
| ind_address_mapping | Maps OneKey Individual address data to a corresponding entity in Salesforce. |
| ind_relations_mapping | Maps OneKey Individual relations data to a corresponding entity in Salesforce. |
Source:
./src/main/resources/mappingTemplates/download/individualMapper.dwl
workplaceMapper.dwl
Contains functions for mapping OneKey “workplace” to Salesforce fields. Uses identifiers from a country-specific workplace.json file and object names from a country-specific objects.json file. If a country-specific file isn't present, default files are considered.
| Function Name | Description |
|---|---|
| Main Functions | |
| mapWorkplaceRecord | Uses Mapper functions to map OneKey Workplace to Salesforce Composite API format during Initial//Delta sync. |
| downloadWorkplaceRecord | Uses Mapper functions to map OneKey Workplace to Salesforce Composite API format during search-download. |
| Mapper Functions | |
| wkp_base_mapping | Maps OneKey Workplace response header fields to a main entity. |
| wkp_hcp_mapping | Maps OneKey Workplace response header fields to an extension entity. |
| wkp_hcp_npi_mapping | Maps OneKey Workplace NPI data to a corresponding entity in Salesforce. |
| wkp_care_specialty_mapping | Maps OneKey Speciality to Master data entity. The ID of the master data will be used in Workplace specialty mapping. |
| wkp_healthcare_specialty_mapping | Maps Speciality ID from master data to Workplace specialties. |
| wkp_business_license_mapping | Maps OneKey Workplace license data and license address data to corresponding entities in Salesforce. |
| wkp_address_mapping | Maps OneKey Workplace address data to a corresponding entity in Salesforce. |
| wkp_relations_mapping | Maps OneKey Workplace relations data to a corresponding entity in Salesforce. |
Source:
./src/main/resources/mappingTemplates/download/workplaceMapper.dwl
Validation Request
| Module | Description |
|---|---|
| objects.json | Salesforce Object names reference file. |
| mapping.json | Template for mapping Salesforce fields to OneKey validation request API format. |
| schema.json | Schema ensures that all technically required fields for the OneKey validation request API are met. |
| mapper.dwl | Functions for mapping Salesforce fields to OneKey validation request API format. |
objects.json
Salesforce objects supported for OneKey Validation request.
Source:
./src/main/resources/mappingTemplates/validation/objects.json
mapping.json
Provides the default template for mapping "Workplace" search fields. To define country-specific mappings, create a file named mapping_{Country_isoCod2}.json. If no country-specific file exists, the system uses the default mapping.json.
| Field Name | Description |
|---|---|
| Source_Field | Salesforce field name in entityName.fieldName format. |
| Target_Field | OneKey field name as per validation request endpoint. |
| Mapping_Field | Identifiers used in mapper.dwl. |
| CodeValues | Optional. Specifies picklist conversions or inherits them from codeValues.json when referCodesMapping is used. |
Source:
./src/main/resources/mappingTemplates/validation/mapping.json
schema.json
Schema ensures that all technically required fields for the OneKey validation request API are met.
Source:
./src/main/resources/mappingTemplates/validation/schema.json
mapper.dwl
Contains functions for mapping Salesforce fields to the OneKey validation request API format. Uses identifiers from mapping.json file and object names from objects.json.
| Function Name | Description |
|---|---|
| getMappingFields | Maps Salesforce fields to corresponding OneKey fields. |
| mapCodeValues | Transforms Salesforce picklist values to OneKey codeValues using mapping.json |
| mapAccount | Maps Salesforce Account fields to OneKey Validation Request fields. |
| mapSpecialty | Maps HealthCareProviderSpecialty fields to OneKey Validation Request fields. |
| mapProvider | Maps HealthCareProvider fields to OneKey Validation Request fields. |
Source:
./src/main/resources/mappingTemplates/validation/mapper.dwl